import requests

from .exceptions import CustomHTTPException


def verify_token(token: str) -> dict:
    return {}
    # headers = {
    #     "accept": "application/json",
    #     "Authorization": f"Bearer {token}"
    # }
    # try:
    #     res = requests.post(VERIFY_TOKEN_URL, headers=headers, params={"token": token}).json()
    #     # 请求成功: {'userno': '3000', 'license_no': 'demo', 'db': 'hg_building_information_demo', 'system_class': 'ADMIN'}
    #     # 请求失败: {'detail': 'Could not validate credentials'}
    #     if "userno" not in res:
    #         raise CustomHTTPException({"detail": "无访问权限"}, 401)
    #     return res
    # except CustomHTTPException as e:
    #     raise e
    # except Exception as e:
    #     raise CustomHTTPException({"detail": "服务端异常"}, 500)
